Skip to content

HUB75 bugfixes for 4-scan and chained panels + new "Seengreat" pinout#5662

Merged
softhack007 merged 20 commits into
mainfrom
hub75_4scan_bugfixes
Jun 30, 2026
Merged

HUB75 bugfixes for 4-scan and chained panels + new "Seengreat" pinout#5662
softhack007 merged 20 commits into
mainfrom
hub75_4scan_bugfixes

Conversation

@softhack007

@softhack007 softhack007 commented Jun 3, 2026

Copy link
Copy Markdown
Member

Improvements:

  • new -S3 pin-out for Seengreat RGB Matrix Adapter Board (https://seengreat.com/wiki/186)
  • allow up to 128 pixels wide panels, prevent uint8 overflow for 128px panels

Bugfixes for 4-scan (aka QS) panels

  • prevent panels going flatter each time that cfg.json is saved (32x32->16x64->8x128->4x128)
  • correct VirtualMatrixPanel setup: need to use real panel dimensions, not modified mxconfig dimensions
  • only set chainType when chain length > 1
  • use a chaintype that does not flip the display upside-down

Summary by CodeRabbit

Summary

  • New Features

    • Added support for an additional ESP32-S3 HUB75 pinout configuration for broader hardware compatibility.
  • Bug Fixes

    • Improved HUB75 panel initialization for HS vs QS types, including corrected virtual/quad-scan sizing and chaining behavior.
    • Updated reported pin/matrix dimensions for quad-scan layouts.
    • Fixed pixel color reads to return consistent RGB values.
    • Improved robustness by handling display/driver allocation failures gracefully with fallback.
    • Added clearer handling for unsupported/unknown HUB75 panel configurations.

align with settings page that also allows up to 64x128 per panel
* prevent panels going flatter each time that cfg.json is saved
* correct VirtualMatrixPanel setup: provide real panel dimensions
* only set chainType when chain length > 1
* use a chaintype that does not flip the display upside-down
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e8d97ea9-09d3-409b-82d4-3d4e6c422a54

📥 Commits

Reviewing files that changed from the base of the PR and between c862008 and 8e6d214.

📒 Files selected for processing (1)
  • wled00/bus_manager.cpp
🚧 Files skipped from review as they are similar to previous changes (1)
  • wled00/bus_manager.cpp

Walkthrough

BusHub75Matrix now tracks quad-scan state, updates HUB75 sizing and driver selection, reorganizes ESP32-S3 pinout mapping, and changes virtual display construction plus pixel and pin reporting.

Changes

HUB75 virtual and quad-scan configuration

Layer / File(s) Summary
Virtual init and scan-mode sizing
wled00/bus_manager.cpp, wled00/bus_manager.h
The class adds _isQuadScan, initializes _isVirtual and _isQuadScan, normalizes panel and chain values as unsigned, clamps chain length, caps half-scan dimensions, applies quarter-scan sizing and driver selection, and changes panel allocation to new(std::nothrow) with null-checking.
ESP32-S3 pinout selection
wled00/bus_manager.cpp
The ESP32-S3 HUB75 pinout branches are reorganized, a SEENGREAT_V2_S3_PINOUT mapping is added, the fallback S3 mapping changes, and unsupported board configurations now stop at compile time.
Virtual display setup and output reporting
wled00/bus_manager.cpp
Virtual mode now selects CHAIN_TOP_RIGHT_DOWN for chained panels, enables virtual rendering from chaining or QS mode, builds virtualDisp with physically clamped dimensions, returns raw pixel buffer values, and reports quad-scan-adjusted pin dimensions.

🎯 4 (Complex) | ⏱️ ~45 minutes

Possibly related PRs

  • wled/WLED#4950: Also changes BusHub75Matrix constructor logic in wled00/bus_manager.cpp, including chain_length typing and clamping behavior.
  • wled/WLED#5026: Touches HUB75 virtual panel setup and related BusHub75Matrix logic, including quad-scan state and output handling.
  • wled/WLED#5647: Also changes HUB75 quarter-scan handling and HUB75_I2S_CFG::FM6124 driver selection in wled00/bus_manager.cpp.

Suggested labels

hardware, Awaiting testing

Suggested reviewers

  • DedeHai
  • netmindz
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main changes: 4-scan/chained HUB75 fixes and a new Seengreat pinout.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot added enhancement hardware (Likely) Setup-specific issue, e.g. flickering LEDs Awaiting testing labels Jun 3, 2026
change local variables to unsigned (=32bit)
coderabbitai[bot]

This comment was marked as low quality.

@softhack007 softhack007 marked this pull request as draft June 3, 2026 20:35
@coderabbitai coderabbitai Bot added the good job label Jun 3, 2026
Comment thread wled00/bus_manager.cpp Outdated
Comment thread wled00/bus_manager.cpp Outdated
Comment thread wled00/bus_manager.cpp Outdated
ensure that BusHub75Matrix::getPixelColor() returns RGBW format, not RGBA.

Currently busses.getPixelColor() is not used by the WLED core.
@coderabbitai coderabbitai Bot added the bug label Jun 4, 2026
coderabbitai[bot]

This comment was marked as resolved.

@DedeHai

DedeHai commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

@softhack007 offtopic: what is up with the rabbit adding random labels?

@softhack007

Copy link
Copy Markdown
Member Author

@softhack007 offtopic: what is up with the rabbit adding random labels?

That was an experiment, I've allowed it to directly add the labels it suggests. Initially it looked meaningful, but it's true we see to many "random" labels. I'll switch that feature off.

@softhack007 softhack007 removed hardware (Likely) Setup-specific issue, e.g. flickering LEDs Awaiting testing labels Jun 4, 2026
@softhack007 softhack007 added this to the 16.0.0 release + bugfixes milestone Jun 9, 2026
@softhack007 softhack007 self-assigned this Jun 19, 2026
@softhack007 softhack007 marked this pull request as ready for review June 29, 2026 17:15
Comment thread wled00/bus_manager.cpp
@softhack007

This comment was marked as duplicate.

Comment thread wled00/bus_manager.cpp Outdated
* prevent using mxconfig.mx_height before it was set
*untangle virtual / physical panel dimensions from _isVirtual
@softhack007

This comment was marked as outdated.

@coderabbitai

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as resolved.

@softhack007 softhack007 requested review from DedeHai and netmindz June 29, 2026 18:16
@softhack007

softhack007 commented Jun 29, 2026

Copy link
Copy Markdown
Member Author

To-Do list for testing:

  • Quad-scan 32x32x2, horizontal
  • Quad-scan 32x32x2, vertical
  • Quad-scan 32x32
  • Dual-Scan 64x64
  • Dual-Scan 64x64x2, horizontal

@softhack007

This comment was marked as outdated.

@coderabbitai

This comment was marked as outdated.

@coderabbitai

This comment was marked as duplicate.

@softhack007

softhack007 commented Jun 30, 2026

Copy link
Copy Markdown
Member Author

🤔 The wrong panel dimensions problem came back for double-scan panels. but only with a "-O2" build. Everything works as it should in a normal "-Os" build.

This might be a pre-existing read/write race / memory error / use-after-free issue that only surfaces with -O2. WLED is built with -Os, so this problem is not blocking, but worth to chase this down later.

Edit: my fault, not a bug. I've accidentally booted an old firmware partition 😅

* comment update
* put bool condition into brackets
@coderabbitai

coderabbitai Bot commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Caution

Review failed

An error occurred during the review process. Please try again later.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@DedeHai DedeHai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no hardware but changes look good to me besides the mask

Comment thread wled00/bus_manager.cpp Outdated
fastled-slim does not need the " & 0x00FFFFFF" mask
@softhack007 softhack007 merged commit 301e962 into main Jun 30, 2026
56 checks passed
@softhack007 softhack007 deleted the hub75_4scan_bugfixes branch June 30, 2026 17:44
softhack007 added a commit that referenced this pull request Jun 30, 2026
…#5662)

Improvements:
* new pinouts for Seengreat RGB Matrix Adapter Board (https://seengreat.com/wiki/186)
* allow up to 128 pixels wide panels, prevent uint8 overflow for 128px panels

Bugfixes for 4-scan (aka QS) panels
* prevent panels going flatter each time that cfg.json is saved (32x32->16x64->8x128->4x128)
* correct VirtualMatrixPanel setup: need to use real panel dimensions, not modified mxconfig dimensions
*only set chainType when chain length > 1; use a chaintype that does not flip the display upside-down
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants